﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 委托事件验证控件
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            validationTextbox1.onValidation = test;
        }


        void test(ValidationEventArgs e)
        {
            if (e.Value.Length <= 2)
            {
                e.IsValid = false;
            }
        }
    }
}
